package com.nf.test;

public class PrinterFactory {
    public  Printer factory(String type){
        if (type.equals("1234"))
        {
            return  new ColorPrinter();
        }  if (type.equals("2345"))
        {
            return  new PMSprinter();
        }  if (type.equals("3456"))
        {
            return  new PMSprinter();
        } if (type.equals("4567"))
        {
            return  new ZSPrinter();
        }
        return null;
    }

}
